function [position,isterminal,direction] = HaltProp_L2(~,S,u)

position = S(1)-(1-u); % The value that we want to be zero

if round(S(2),5)==0
    position = 0;
    isterminal = 1;
elseif or(S(2)>0.1,S(2)<-0.1)
    isterminal = 0;
else
    isterminal = 1;
end



direction = 0;

end